#ifndef DRAWABLE__H
#define DRAWABLE__H
#include <iostream>
#include "vector2f.h"

// Drawable is an Abstract Base Class (ABC) that
// specifies the methods that derived classes may
// and must have.
class Drawable {
public:
  Drawable(const Vector2f& pos, const Vector2f& vel) : 
    position(pos), velocity(vel), initialVelocity(vel) {}

  Drawable(const Drawable& s) : position(s.position), velocity(s.velocity),
    initialVelocity(s.velocity) { }

  virtual ~Drawable() {}

  virtual void draw() const = 0;
  virtual void update(unsigned) = 0;

  float X() const { return position[0]; }
  void X(float x) { position[0] = x; }

  float Y() const { return position[1]; }
  void Y(float y) { position[1] = y; }

  float velocityX() const { return velocity[0]; }
  void velocityX(float vx) { velocity[0] = vx; }

  float velocityY() const { return velocity[1]; }
  void velocityY(float vy) { velocity[1] = vy; }

protected:
  Vector2f position;
  Vector2f velocity;
  Vector2f initialVelocity;
};
#endif
